<?php
class NodeIndexAction extends CAction{
    public $nodeType;
    public $title = 'Manage information';

    function run(){
        $model = new Node('search');
        if(isset($_GET['Node'])){
            $model->attributes = $_GET['Node'];
        }

        if($this->nodeType == NULL && isset($_GET['type'])){
            $this->nodeType = $_GET['type'];
        }

        $this->controller->pageTitle =ucfirst($this->nodeType).' Manager';
        $this->controller->render('//object/node/index', array(
            'model' => $model,
            'nodeType' => $this->nodeType,
            'title' => $this->title
        ));
    }
}